package com.ls.fw.frame.api.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ls.fw.data.annotation.FwColumn;
import com.ls.fw.data.annotation.FwTable;
import com.ls.fw.data.bean.BaseDataEntity;
import com.ls.fw.data.converter.CustomDateSerializer;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;

@Table(name = "api_access_log")
@FwTable(name = "api_access_log",remark = "")
public class ApiAccessLogVo extends BaseDataEntity implements Serializable {
    /**
     * ID
     */
    @Id
    @FwColumn(name = "id",remark = "ID")
    @GeneratedValue(generator = "JDBC")
    private Long id;

    /**
     * 请求时间
     */
    @Column(name = "request_dt")
    @FwColumn(name = "request_dt",remark = "请求时间")
    private Date requestDt;

    @Column(name = "request_dt")
    @FwColumn(name = "request_dt",remark = "请求时间")
    private Date requestDtSt;

    @Column(name = "request_dt")
    @FwColumn(name = "request_dt",remark = "请求时间")
    private Date requestDtEd;

    /**
     * 响应时间
     */
    @Column(name = "response_dt")
    @FwColumn(name = "response_dt",remark = "响应时间")
    private Date responseDt;

    @Column(name = "response_dt")
    @FwColumn(name = "response_dt",remark = "响应时间")
    private Date responseDtSt;

    @Column(name = "response_dt")
    @FwColumn(name = "response_dt",remark = "响应时间")
    private Date responseDtEd;

    /**
     * 请求来源IP
     */
    @Column(name = "request_ip")
    @FwColumn(name = "request_ip",remark = "请求来源IP")
    private String requestIp;

    /**
     * 请求方式
     */
    @FwColumn(name = "method",remark = "请求方式")
    private String method;

    /**
     * api类型
     */
    @Column(name = "api_type")
    @FwColumn(name = "api_type",remark = "api类型")
    private String apiType;

    /**
     * api账号id
     */
    @Column(name = "api_account_id")
    @FwColumn(name = "api_account_id",remark = "api账号id")
    private Long apiAccountId;

    @Column(name = "mod_dt")
    @FwColumn(name = "mod_dt",remark = "修改时间")
    private Date modDtSt;

    @Column(name = "mod_dt")
    @FwColumn(name = "mod_dt",remark = "修改时间")
    private Date modDtEd;

    @Column(name = "create_dt")
    @FwColumn(name = "create_dt",remark = "创建时间")
    private Date createDtSt;

    @Column(name = "create_dt")
    @FwColumn(name = "create_dt",remark = "创建时间")
    private Date createDtEd;

    @Column(name = "update_ts")
    @FwColumn(name = "update_ts",remark = "")
    private Date updateTsSt;

    @Column(name = "update_ts")
    @FwColumn(name = "update_ts",remark = "")
    private Date updateTsEd;

    @Column(name = "insert_ts")
    @FwColumn(name = "insert_ts",remark = "时间戳")
    private Date insertTsSt;

    @Column(name = "insert_ts")
    @FwColumn(name = "insert_ts",remark = "时间戳")
    private Date insertTsEd;

    /**
     * 请求信息
     */
    @Column(name = "request_info")
    @FwColumn(name = "request_info",remark = "请求信息")
    private String requestInfo;

    /**
     * 返回信息
     */
    @Column(name = "response_info")
    @FwColumn(name = "response_info",remark = "返回信息")
    private String responseInfo;

    private static final long serialVersionUID = 1L;

    /**
     * 获取ID
     *
     * @return id - ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置ID
     *
     * @param id ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取请求时间
     *
     * @return request_dt - 请求时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getRequestDt() {
        return requestDt;
    }

    /**
     * 设置请求时间
     *
     * @param requestDt 请求时间
     */
    public void setRequestDt(Date requestDt) {
        this.requestDt = requestDt;
    }

    /**
     * 获取请求时间
     *
     * @return request_dt - 请求时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getRequestDtSt() {
        return requestDtSt;
    }

    /**
     * 设置请求时间
     *
     * @param requestDtSt 请求时间
     */
    public void setRequestDtSt(Date requestDtSt) {
        this.requestDtSt = requestDtSt;
    }

    /**
     * 获取请求时间
     *
     * @return request_dt - 请求时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getRequestDtEd() {
        return requestDtEd;
    }

    /**
     * 设置请求时间
     *
     * @param requestDtEd 请求时间
     */
    public void setRequestDtEd(Date requestDtEd) {
        this.requestDtEd = requestDtEd;
    }

    /**
     * 获取响应时间
     *
     * @return response_dt - 响应时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getResponseDt() {
        return responseDt;
    }

    /**
     * 设置响应时间
     *
     * @param responseDt 响应时间
     */
    public void setResponseDt(Date responseDt) {
        this.responseDt = responseDt;
    }

    /**
     * 获取响应时间
     *
     * @return response_dt - 响应时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getResponseDtSt() {
        return responseDtSt;
    }

    /**
     * 设置响应时间
     *
     * @param responseDtSt 响应时间
     */
    public void setResponseDtSt(Date responseDtSt) {
        this.responseDtSt = responseDtSt;
    }

    /**
     * 获取响应时间
     *
     * @return response_dt - 响应时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getResponseDtEd() {
        return responseDtEd;
    }

    /**
     * 设置响应时间
     *
     * @param responseDtEd 响应时间
     */
    public void setResponseDtEd(Date responseDtEd) {
        this.responseDtEd = responseDtEd;
    }

    /**
     * 获取请求来源IP
     *
     * @return request_ip - 请求来源IP
     */
    public String getRequestIp() {
        return requestIp;
    }

    /**
     * 设置请求来源IP
     *
     * @param requestIp 请求来源IP
     */
    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp == null ? null : requestIp.trim();
    }

    /**
     * 获取请求方式
     *
     * @return method - 请求方式
     */
    public String getMethod() {
        return method;
    }

    /**
     * 设置请求方式
     *
     * @param method 请求方式
     */
    public void setMethod(String method) {
        this.method = method == null ? null : method.trim();
    }

    /**
     * 获取api类型
     *
     * @return api_type - api类型
     */
    public String getApiType() {
        return apiType;
    }

    /**
     * 设置api类型
     *
     * @param apiType api类型
     */
    public void setApiType(String apiType) {
        this.apiType = apiType == null ? null : apiType.trim();
    }

    /**
     * 获取api账号id
     *
     * @return api_account_id - api账号id
     */
    public Long getApiAccountId() {
        return apiAccountId;
    }

    /**
     * 设置api账号id
     *
     * @param apiAccountId api账号id
     */
    public void setApiAccountId(Long apiAccountId) {
        this.apiAccountId = apiAccountId;
    }

    /**
     * 获取修改时间
     *
     * @return mod_dt - 修改时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getModDtSt() {
        return modDtSt;
    }

    /**
     * 设置修改时间
     *
     * @param modDtSt 修改时间
     */
    public void setModDtSt(Date modDtSt) {
        this.modDtSt = modDtSt;
    }

    /**
     * 获取修改时间
     *
     * @return mod_dt - 修改时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getModDtEd() {
        return modDtEd;
    }

    /**
     * 设置修改时间
     *
     * @param modDtEd 修改时间
     */
    public void setModDtEd(Date modDtEd) {
        this.modDtEd = modDtEd;
    }

    /**
     * 获取创建时间
     *
     * @return create_dt - 创建时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getCreateDtSt() {
        return createDtSt;
    }

    /**
     * 设置创建时间
     *
     * @param createDtSt 创建时间
     */
    public void setCreateDtSt(Date createDtSt) {
        this.createDtSt = createDtSt;
    }

    /**
     * 获取创建时间
     *
     * @return create_dt - 创建时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getCreateDtEd() {
        return createDtEd;
    }

    /**
     * 设置创建时间
     *
     * @param createDtEd 创建时间
     */
    public void setCreateDtEd(Date createDtEd) {
        this.createDtEd = createDtEd;
    }

    /**
     * @return update_ts
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getUpdateTsSt() {
        return updateTsSt;
    }

    /**
     * @param updateTsSt
     */
    public void setUpdateTsSt(Date updateTsSt) {
        this.updateTsSt = updateTsSt;
    }

    /**
     * @return update_ts
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getUpdateTsEd() {
        return updateTsEd;
    }

    /**
     * @param updateTsEd
     */
    public void setUpdateTsEd(Date updateTsEd) {
        this.updateTsEd = updateTsEd;
    }

    /**
     * 获取时间戳
     *
     * @return insert_ts - 时间戳
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getInsertTsSt() {
        return insertTsSt;
    }

    /**
     * 设置时间戳
     *
     * @param insertTsSt 时间戳
     */
    public void setInsertTsSt(Date insertTsSt) {
        this.insertTsSt = insertTsSt;
    }

    /**
     * 获取时间戳
     *
     * @return insert_ts - 时间戳
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonSerialize(using=CustomDateSerializer.class)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public Date getInsertTsEd() {
        return insertTsEd;
    }

    /**
     * 设置时间戳
     *
     * @param insertTsEd 时间戳
     */
    public void setInsertTsEd(Date insertTsEd) {
        this.insertTsEd = insertTsEd;
    }

    /**
     * 获取请求信息
     *
     * @return request_info - 请求信息
     */
    public String getRequestInfo() {
        return requestInfo;
    }

    /**
     * 设置请求信息
     *
     * @param requestInfo 请求信息
     */
    public void setRequestInfo(String requestInfo) {
        this.requestInfo = requestInfo == null ? null : requestInfo.trim();
    }

    /**
     * 获取返回信息
     *
     * @return response_info - 返回信息
     */
    public String getResponseInfo() {
        return responseInfo;
    }

    /**
     * 设置返回信息
     *
     * @param responseInfo 返回信息
     */
    public void setResponseInfo(String responseInfo) {
        this.responseInfo = responseInfo == null ? null : responseInfo.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ApiAccessLogVo other = (ApiAccessLogVo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRequestDt() == null ? other.getRequestDt() == null : this.getRequestDt().equals(other.getRequestDt()))
            && (this.getResponseDt() == null ? other.getResponseDt() == null : this.getResponseDt().equals(other.getResponseDt()))
            && (this.getRequestIp() == null ? other.getRequestIp() == null : this.getRequestIp().equals(other.getRequestIp()))
            && (this.getMethod() == null ? other.getMethod() == null : this.getMethod().equals(other.getMethod()))
            && (this.getApiType() == null ? other.getApiType() == null : this.getApiType().equals(other.getApiType()))
            && (this.getApiAccountId() == null ? other.getApiAccountId() == null : this.getApiAccountId().equals(other.getApiAccountId()))
            && (this.getModUser() == null ? other.getModUser() == null : this.getModUser().equals(other.getModUser()))
            && (this.getModUserId() == null ? other.getModUserId() == null : this.getModUserId().equals(other.getModUserId()))
            && (this.getModDt() == null ? other.getModDt() == null : this.getModDt().equals(other.getModDt()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getCreateDt() == null ? other.getCreateDt() == null : this.getCreateDt().equals(other.getCreateDt()))
            && (this.getDeleteClass() == null ? other.getDeleteClass() == null : this.getDeleteClass().equals(other.getDeleteClass()))
            && (this.getValidClass() == null ? other.getValidClass() == null : this.getValidClass().equals(other.getValidClass()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getUpdateTs() == null ? other.getUpdateTs() == null : this.getUpdateTs().equals(other.getUpdateTs()))
            && (this.getInsertTs() == null ? other.getInsertTs() == null : this.getInsertTs().equals(other.getInsertTs()))
            && (this.getRequestInfo() == null ? other.getRequestInfo() == null : this.getRequestInfo().equals(other.getRequestInfo()))
            && (this.getResponseInfo() == null ? other.getResponseInfo() == null : this.getResponseInfo().equals(other.getResponseInfo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRequestDt() == null) ? 0 : getRequestDt().hashCode());
        result = prime * result + ((getResponseDt() == null) ? 0 : getResponseDt().hashCode());
        result = prime * result + ((getRequestIp() == null) ? 0 : getRequestIp().hashCode());
        result = prime * result + ((getMethod() == null) ? 0 : getMethod().hashCode());
        result = prime * result + ((getApiType() == null) ? 0 : getApiType().hashCode());
        result = prime * result + ((getApiAccountId() == null) ? 0 : getApiAccountId().hashCode());
        result = prime * result + ((getModUser() == null) ? 0 : getModUser().hashCode());
        result = prime * result + ((getModUserId() == null) ? 0 : getModUserId().hashCode());
        result = prime * result + ((getModDt() == null) ? 0 : getModDt().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateDt() == null) ? 0 : getCreateDt().hashCode());
        result = prime * result + ((getDeleteClass() == null) ? 0 : getDeleteClass().hashCode());
        result = prime * result + ((getValidClass() == null) ? 0 : getValidClass().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getUpdateTs() == null) ? 0 : getUpdateTs().hashCode());
        result = prime * result + ((getInsertTs() == null) ? 0 : getInsertTs().hashCode());
        result = prime * result + ((getRequestInfo() == null) ? 0 : getRequestInfo().hashCode());
        result = prime * result + ((getResponseInfo() == null) ? 0 : getResponseInfo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(","+super.toString());
        sb.append(", id=").append(id);
        sb.append(", requestDt=").append(requestDt);
        sb.append(", requestDtSt=").append(requestDtSt);
        sb.append(", requestDtEd=").append(requestDtEd);
        sb.append(", responseDt=").append(responseDt);
        sb.append(", responseDtSt=").append(responseDtSt);
        sb.append(", responseDtEd=").append(responseDtEd);
        sb.append(", requestIp=").append(requestIp);
        sb.append(", method=").append(method);
        sb.append(", apiType=").append(apiType);
        sb.append(", apiAccountId=").append(apiAccountId);
        sb.append(", modDtSt=").append(modDtSt);
        sb.append(", modDtEd=").append(modDtEd);
        sb.append(", createDtSt=").append(createDtSt);
        sb.append(", createDtEd=").append(createDtEd);
        sb.append(", updateTsSt=").append(updateTsSt);
        sb.append(", updateTsEd=").append(updateTsEd);
        sb.append(", insertTsSt=").append(insertTsSt);
        sb.append(", insertTsEd=").append(insertTsEd);
        sb.append(", requestInfo=").append(requestInfo);
        sb.append(", responseInfo=").append(responseInfo);
        sb.append("]");
        return sb.toString();
    }
}